Optimal. Leaf size=80 \[ \frac{b (2 a+3 b) \tan ^5(e+f x)}{5 f}+\frac{(a+b) (a+3 b) \tan ^3(e+f x)}{3 f}+\frac{(a+b)^2 \tan (e+f x)}{f}+\frac{b^2 \tan ^7(e+f x)}{7 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0759502, antiderivative size = 80, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.087, Rules used = {4146, 373} \[ \frac{b (2 a+3 b) \tan ^5(e+f x)}{5 f}+\frac{(a+b) (a+3 b) \tan ^3(e+f x)}{3 f}+\frac{(a+b)^2 \tan (e+f x)}{f}+\frac{b^2 \tan ^7(e+f x)}{7 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4146
Rule 373
Rubi steps
\begin{align*} \int \sec ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx &=\frac{\operatorname{Subst}\left (\int \left (1+x^2\right ) \left (a+b+b x^2\right )^2 \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \left ((a+b)^2+(a+b) (a+3 b) x^2+b (2 a+3 b) x^4+b^2 x^6\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{(a+b)^2 \tan (e+f x)}{f}+\frac{(a+b) (a+3 b) \tan ^3(e+f x)}{3 f}+\frac{b (2 a+3 b) \tan ^5(e+f x)}{5 f}+\frac{b^2 \tan ^7(e+f x)}{7 f}\\ \end{align*}
Mathematica [A] time = 0.38451, size = 75, normalized size = 0.94 \[ \frac{35 \left (a^2+4 a b+3 b^2\right ) \tan ^3(e+f x)+21 b (2 a+3 b) \tan ^5(e+f x)+105 (a+b)^2 \tan (e+f x)+15 b^2 \tan ^7(e+f x)}{105 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.038, size = 104, normalized size = 1.3 \begin{align*}{\frac{1}{f} \left ( -{a}^{2} \left ( -{\frac{2}{3}}-{\frac{ \left ( \sec \left ( fx+e \right ) \right ) ^{2}}{3}} \right ) \tan \left ( fx+e \right ) -2\,ab \left ( -{\frac{8}{15}}-1/5\, \left ( \sec \left ( fx+e \right ) \right ) ^{4}-{\frac{4\, \left ( \sec \left ( fx+e \right ) \right ) ^{2}}{15}} \right ) \tan \left ( fx+e \right ) -{b}^{2} \left ( -{\frac{16}{35}}-{\frac{ \left ( \sec \left ( fx+e \right ) \right ) ^{6}}{7}}-{\frac{6\, \left ( \sec \left ( fx+e \right ) \right ) ^{4}}{35}}-{\frac{8\, \left ( \sec \left ( fx+e \right ) \right ) ^{2}}{35}} \right ) \tan \left ( fx+e \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.999666, size = 109, normalized size = 1.36 \begin{align*} \frac{15 \, b^{2} \tan \left (f x + e\right )^{7} + 21 \,{\left (2 \, a b + 3 \, b^{2}\right )} \tan \left (f x + e\right )^{5} + 35 \,{\left (a^{2} + 4 \, a b + 3 \, b^{2}\right )} \tan \left (f x + e\right )^{3} + 105 \,{\left (a^{2} + 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )}{105 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.490088, size = 234, normalized size = 2.92 \begin{align*} \frac{{\left (2 \,{\left (35 \, a^{2} + 56 \, a b + 24 \, b^{2}\right )} \cos \left (f x + e\right )^{6} +{\left (35 \, a^{2} + 56 \, a b + 24 \, b^{2}\right )} \cos \left (f x + e\right )^{4} + 6 \,{\left (7 \, a b + 3 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + 15 \, b^{2}\right )} \sin \left (f x + e\right )}{105 \, f \cos \left (f x + e\right )^{7}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{2} \sec ^{4}{\left (e + f x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.24721, size = 166, normalized size = 2.08 \begin{align*} \frac{15 \, b^{2} \tan \left (f x + e\right )^{7} + 42 \, a b \tan \left (f x + e\right )^{5} + 63 \, b^{2} \tan \left (f x + e\right )^{5} + 35 \, a^{2} \tan \left (f x + e\right )^{3} + 140 \, a b \tan \left (f x + e\right )^{3} + 105 \, b^{2} \tan \left (f x + e\right )^{3} + 105 \, a^{2} \tan \left (f x + e\right ) + 210 \, a b \tan \left (f x + e\right ) + 105 \, b^{2} \tan \left (f x + e\right )}{105 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]